<template>
    <br>
    <p1>name:{{ name }}</p1>
    <br>
    <button @click="showName">点击</button>
</template>

<script lang="ts">
export default {
    name: 'Hello'
}
</script>

<!--setup语法糖-->
<script setup lang="ts">
let name = '张三'

function showName() {
    alert(name)
}
</script>